package main

/*
#cgo CFLAGS: -I.
#cgo LDFLAGS: -L. -lgreet
#include <stdio.h>
#include <stdlib.h>
extern void greet(char *name);
*/
import "C"
import "unsafe"

func main() {
    name := C.CString("World")
    defer C.free(unsafe.Pointer(name))
    C.greet(name)
}